package com.ccc.boot.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ccc.boot.base.IBaseService;
import com.ccc.boot.pojo.Query;
import com.ccc.boot.pojo.UserVO;
import com.ccc.boot.system.entity.SysUser;
import com.ccc.boot.system.pojo.PasswordParam;
import com.ccc.boot.system.pojo.RelateUserVO;
import com.ccc.boot.system.pojo.SysUserData;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface SysUserService extends IBaseService<SysUser> {

    boolean updateDept(Long id, Long deptId);

    boolean updatePassword(PasswordParam param);

    boolean removeImage(Long id);

    IPage<UserVO> pageUser(Query query);

    List<UserVO> getEnabledUsers(UserVO query);

    IPage<UserVO> getUsersByRole(Long roleId, Query query);

    IPage<RelateUserVO> getUsersByDept(Long roleId, Query query);

    SysUser getUserInfo(String username);

    SysUserData getUser(Long id);

    SysUser getByUsername(String username);

    SysUser getByPhone(String phone);

    /**
     * 统计多少用户使用该头像
     *
     * @date 2022/4/13 22:39
     * @param fileId
     * @return {@link int}
     * @author superC
     */

    int countUser(Long fileId);

    void export(List<UserVO> list, HttpServletResponse response);

    void exportAll(HttpServletResponse response);

}
